package org.xzx.shop_api.service;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import org.xzx.shop_api.entity.Address;
import org.xzx.shop_api.entity.District;
import org.xzx.shop_api.entity.Members;
import org.xzx.shop_api.utils.JsonResult;

@Service
public interface MembersService {
    public int insertMember(Members members);
    public Members getMembersByUsername(String username);
    public int updateMember(String username, String password);
    public int updatePayPassword(int id, String password);

    //更新手机号码
    public int updateMobile(int id, String mobile);
    //根据用户名查询账号信息
    public Members getMembersByMobile(String mobile);

    //根据用户id查找
    public Members getMembersById(int id);

    //修改个人信息接口
    public int updateMyInfo(int id,
                            @Param("username") String username,
                            @Param("nickname")String nickname,
                            @Param("gender") int gender,
                            @Param("birthday")String birthday);

    //上传头像
    public int updateLogo(int id, @Param("logo") String logo);

    //修改认证状态
    public int updateIsAuth(int id,  int isAuth);

    //添加
    public int insertAddress(Address address) ;

    //根据用户id查询收件地址信息
    public Members getMembersAddressListByMembersId(int member_id);

    //根据pid查询地区名称
    public District getDistrictById(int pid);

    //根据id删除地址
    public int getDeleteById(int id);

    //根据id查询地址
    public Address selectAddressById(int id);
}
